

<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>H+ 后台主题UI框架 - 空白页</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="favicon.ico">
     <link href="__STATIC__/layout/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__STATIC__/layout/css/font-awesome.css?v=4.4.0" rel="stylesheet">
     <!-- jqgrid-->
    <link href="__STATIC__/layout/css/animate.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="__STATIC__/layout/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
    <style>
    </style>
</head>

<body style="color:#333;">
    <!-- 标题 -->
    <div class="page-heade">
      <h2 class="title_color text-center"><span id="title">{$nian}</span>-{$product.brand_name}-决策依据</h2>
    </div>
    <!-- 标题 -->
    <div style="padding:3px;">
    <form action=""  class="form-inline" method="post" id="f1">
      <table class="tab-content table-bordered  table" border="1" style="margin-bottom:1px">
          <tr>
          <td><label for="" class="form-label">财年：</label>
       		
           <select name="cid" id="cid" class="form-control">
                          {volist name="cainian" id="c"}
                            <option value="{$c.id}" {if $c.id==$cid} selected {/if} >{$c.title}</option>
                          {/volist}
                      </select>
			<span class="lr_5"></span>
			品牌：
              <div class="input-group">
               <select name="pid" id="pid" class="form-control">
                          {volist name="pro" id="p"}
                            <option value="{$p.id}" {if $p.id==$pid} selected {/if} >{$p.brand_name}</option>
                          {/volist}
                      </select>
             </div>
        <span class="lr_5"></span>
              <button class="btn btn-info query" type="button">查询</button>  <span class="lr_5"></span>
              <button class="btn btn-info LendExcel" onclick="dc({$cid},{$pid})" type="button">导出Excel</button>
          </td>
            </tr>
      </table>
         <table class="table table-bordered table-hover bud_hei text-center">
          <tr class="info">
            <td>品牌</td>
            <td>三级费用科目</td>
            <td>第1季度</td>
            <td>第2季度</td>
            <td>第3季度</td>
            <td>第4季度</td>
            <td>总计</td>
          </tr>
          <tr>
            <td rowspan="{$rol}">{$product.brand_name}</td>
            <td>{$kemu.0.title}预算</td>
            {volist name="$kemu.0.ys" id="y"}
            <td class="text-right ObjectNum">{$y}</td>
            {/volist}
            <td class="text-right ObjectNum">{$kemu.0.zys}</td>
          </tr>
          <tr>
            <td>{$kemu.0.title}实际</td>
           {volist name="$kemu.0.sj" id="y"}
            <td class="text-right ObjectNum">{$y}</td>
            {/volist}
            <td class="text-right ObjectNum">{$kemu.0.zsj}</td>
          </tr>
          <tr class="warning text-right">
               <td>差异：</td>
               {volist name="$kemu.0.cy" id="y"}
            <td class="text-right ObjectNum">{$y}</td>
            {/volist}
            <td class="text-right ObjectNum">{$kemu.0.zcy}</td>
          </tr>
          {volist name="kemu" offset="1" id="vo"}
            <tr>
            
            <td>{$vo.title}预算</td>
            {volist name="$vo.ys" id="y"}
            <td class="text-right ObjectNum">{$y}</td>
            {/volist}
            <td class="text-right ObjectNum">{$vo.zys}</td>
          </tr>
          <tr>
            <td>{$vo.title}实际</td>
            {volist name="$vo.sj" id="y"}
            <td class="text-right ObjectNum">{$y}</td>
            {/volist}
            <td class="text-right ObjectNum">{$vo.zsj}</td>
          </tr>
          <tr class="warning text-right">
               <td>差异：</td>
               {volist name="$vo.cy" id="y"}
            <td class="text-right ObjectNum">{$y}</td>
            {/volist}
            <td class="text-right ObjectNum">{$vo.zcy}</td>
          </tr>
          {/volist}
            <tr class="warning text-right">
               <td colspan="2">品牌预算小计：</td>
               {volist name="kaohe1" id="vo"}
               <td class="ObjectNum">{$vo.ys}</td>
               {/volist}
               
               <td class="ObjectNum">{$all.ys}</td>
          
          
          </tr>
           <tr class="warning text-right">
               <td colspan="2">品牌实际投入小计：</td>
               {volist name="kaohe1" id="vo"}
               <td class="ObjectNum">{$vo.sj}</td>
               {/volist}
               
               <td class="ObjectNum">{$all.sj}</td>
          </tr>
           <tr class="warning text-right">
               <td colspan="2">品牌投入差异小计：</td>
               {volist name="kaohe1" id="vo"}
               <td class="ObjectNum">{$vo.cy}</td>
               {/volist}
               
               <td class="ObjectNum">{$all.cy}</td>
          </tr>
      </table>
</form>
    </div>
    <!-- 全局js -->
    <script src="__STATIC__/layout/js/jquery.min.js?v=2.1.4"></script>
    <script src="__STATIC__/layout/js/bootstrap.min.js?v=3.3.6"></script>
    <!-- <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script> -->
    <script src="__STATIC__/layout/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
    <script src="__STATIC__/layout/js/plugins/suggest/bootstrap-suggest.min.js"></script>
      <script src="__STATIC__/layout/js/common.js"></script>
    <script>
    function dc(cid,pid){
      window.open("{:url('ysdc')}?cid="+cid+"&pid="+pid)
    }
    $(".query").click(function(){
      document.getElementById("f1").submit();
    })
       $(document).ready(function(){
            var $ObjectNum =$(".ObjectNum");
               toNum($ObjectNum);

             });
        var net = $("#net");
           var product= $("#product");
           sousuo(net);
           sousuo(product);

          function sousuo(id){
            id.bsSuggest({
            allowNoKeyword: true, //是否允许无关键字时请求数据
            multiWord: true, //以分隔符号分割的多关键字支持
            separator: ",", //多关键字支持时的分隔符，默认为空格
            getDataMethod: "url", //获取数据的方式，总是从 URL 获取
            url: 'http://unionsug.baidu.com/su?p=3&t=' + (new Date()).getTime() + '&wd=',
            /*优先从url ajax 请求 json 帮助数据，注意最后一个参数为关键字请求参数*/
            jsonp: 'cb',
            /*如果从 url 获取数据，并且需要跨域，则该参数必须设置*/
            processData: function (json) { // url 获取数据时，对数据的处理，作为 getData 的回调函数
                var i, len, data = {
                    value: []
                };
                if (!json || !json.s || json.s.length === 0) {
                    return false;
                }

                // console.log(json);
                len = json.s.length;

                jsonStr = "{'value':[";
                for (i = 0; i < len; i++) {
                    data.value.push({
                        word: json.s[i]
                    });
                }
                data.defaults = 'baidu';

                //字符串转化为 js 对象
                return data;
            }
        });

          }

    </script>
</body>

</html>
